<?php
    class Admin_Form_ValidateRole
    {
        public function validateRoleName($role_name){
            $validate = new Zend_Validate_StringLength(1, 50);
            if($validate->isValid($role_name)){
                
                $validate = new Zend_Validate_Alpha(true);
                
                if($validate->isValid($role_name)){
                    return true;
                }
                else{
                    return false;
                }
            }
            else{
                return false;
            }
        }
        
        public function validateSearch($keyword){
            $validate = new Zend_Validate_NotEmpty();
            if($validate->isValid($keyword)){
                return true;
            }
            else{
                return false;
            }
        }
    }
